<layout name="layout"/>
<include file="./nav"/>

<!-- BEGIN CONTAINER -->

<div class="page-container row-fluid">

	<!-- BEGIN PAGE -->

	<div class="page-content">

		<!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->

		<div id="portlet-config" class="modal hide">

			<div class="modal-header">

				<button data-dismiss="modal" class="close" type="button"></button>

				<h3>portlet Settings</h3>

			</div>

			<div class="modal-body">

				<p>Here will be a configuration form</p>

			</div>

		</div>

		<!-- END SAMPLE PORTLET CONFIGURATION MODAL FORM-->

		<!-- BEGIN PAGE CONTAINER-->

		<div class="container-fluid">

			<!-- BEGIN PAGE HEADER-->

			<div class="row-fluid">

				<div class="span12">

					<!-- BEGIN PAGE TITLE & BREADCRUMB-->

					<h3 class="page-title">权限列表</h3>

					<ul class="breadcrumb">

						<li>

							<i class="icon-home"></i>

							<a href="index.html">首页</a>

							<i class="icon-angle-right"></i>

						</li>

						<li>

							<a href="#">RBAC</a>

							<i class="icon-angle-right"></i>

						</li>

						<li><a href="#">权限列表</a></li>

					</ul>

					<!-- END PAGE TITLE & BREADCRUMB-->

				</div>

			</div>

			<!-- END PAGE HEADER-->

			<!-- BEGIN PAGE CONTENT-->

			<div class="row-fluid">

				<div class="span12">

					<!-- BEGIN EXAMPLE TABLE PORTLET-->

					<div >

						<div class="portlet-title">

							<div class="caption"><i class="icon-edit"></i>权限信息</div>

							<div class="tools">
								<a href="{:U('Privilege/add')}" style="font-size: 18px;margin-right:20px">添加权限</a>
							</div>

						</div>

						<form method="post" action="" name="listForm" onsubmit="">
							<div  >
								<table cellpadding="3" cellspacing="1" class="table table-striped table-hover table-bordered dataTable">
									<thead style="background: #C5C1AA">
									<tr role="row">
										<th style="text-align: left">权限名称</th>
										<th >模块名称</th>
										<th >控制器名称</th>
										<th >方法名称</th>
										<th >上级权限id</th>
										<th width="20%">操作</th>
									</tr>
									</thead>
									<?php foreach ($data as $k => $v): ?>
									<tbody>
									<tr class="tron">
										<td style="text-align: left"><?php echo str_repeat('-', 8*$v['level']); ?><?php echo $v['pri_name']; ?></td>
										<td><?php echo $v['module_name']; ?></td>
										<td><?php echo $v['controller_name']; ?></td>
										<td><?php echo $v['action_name']; ?></td>
										<td><?php echo $v['parent_id']; ?></td>
										<td align="center">
											<a href="<?php echo U('edit?id='.$v['id'].'&p='.I('get.p')); ?>" title="编辑">编辑</a> |
											<a href="<?php echo U('delete?id='.$v['id'].'&p='.I('get.p')); ?>" onclick="return confirm('确定要删除吗？');" title="移除">移除</a>
										</td>
									</tr>
									</tbody>
									<?php endforeach; ?>
								</table>
							</div>
							<div class="span6">
								<div class="dataTables_paginate paging_bootstrap pagination">
									<ul>
										<li>{$page}</li>
									</ul>
								</div>
							</div>
						</form>

					</div>

					<!-- END EXAMPLE TABLE PORTLET-->

				</div>

			</div>

			<!-- END PAGE CONTENT -->

		</div>

		<!-- END PAGE CONTAINER-->

	</div>

	<!-- END PAGE -->

</div>

<!-- END CONTAINER -->

<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->

<!-- BEGIN CORE PLUGINS -->

<script src="__PUBLIC__/media/js/jquery-1.10.1.min.js" type="text/javascript"></script>

<script src="__PUBLIC__/media/js/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>

<!-- IMPORTANT! Load jquery-ui-1.10.1.custom.min.js before bootstrap.min.js to fix bootstrap tooltip conflict with jquery ui tooltip -->

<script src="__PUBLIC__/media/js/jquery-ui-1.10.1.custom.min.js" type="text/javascript"></script>

<script src="__PUBLIC__/media/js/bootstrap.min.js" type="text/javascript"></script>

<!--[if lt IE 9]>

<script src="__PUBLIC__/media/js/excanvas.min.js"></script>

<script src="__PUBLIC__/media/js/respond.min.js"></script>

<![endif]-->

<script src="__PUBLIC__/media/js/jquery.slimscroll.min.js" type="text/javascript"></script>

<script src="__PUBLIC__/media/js/jquery.blockui.min.js" type="text/javascript"></script>

<script src="__PUBLIC__/media/js/jquery.cookie.min.js" type="text/javascript"></script>

<script src="__PUBLIC__/media/js/jquery.uniform.min.js" type="text/javascript" ></script>

<!-- END CORE PLUGINS -->

<!-- BEGIN PAGE LEVEL PLUGINS -->

<script type="text/javascript" src="__PUBLIC__/media/js/select2.min.js"></script>

<script type="text/javascript" src="__PUBLIC__/media/js/jquery.dataTables.js"></script>

<script type="text/javascript" src="__PUBLIC__/media/js/DT_bootstrap.js"></script>

<!-- END PAGE LEVEL PLUGINS -->

<!-- BEGIN PAGE LEVEL SCRIPTS -->

<script src="__PUBLIC__/media/js/app.js"></script>

<script src="__PUBLIC__/media/js/table-editable.js"></script>

<script>

	jQuery(document).ready(function() {

		App.init();

		TableEditable.init();

	});

</script>

<!--时间插件-->
<link href="__PUBLIC__/datetimepicker/jquery-ui-1.9.2.custom.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/datetimepicker/jquery-ui-1.9.2.custom.min.js"></script>
<script type="text/javascript" charset="utf-8" src="__PUBLIC__/datetimepicker/datepicker-zh_cn.js"></script>
<link rel="stylesheet" media="all" type="text/css" href="__PUBLIC__/datetimepicker/time/jquery-ui-timepicker-addon.min.css" />
<script type="text/javascript" src="__PUBLIC__/datetimepicker/time/jquery-ui-timepicker-addon.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/datetimepicker/time/i18n/jquery-ui-timepicker-addon-i18n.min.js"></script>
<script>
	// 添加时间插件
	$.timepicker.setDefaults($.timepicker.regional['zh-CN']);  // 设置使用中文

	$("#fa").datetimepicker();
	$("#ta").datetimepicker();
</script>

<!-- 引入行高亮显示 -->
<script type="text/javascript" src="__PUBLIC__/Admin/Js/tron.js"></script>
